FROM registry.cn-shanghai.aliyuncs.com/ecoolex-prod/centos7jdk8:latest

ADD ./pom.xml pom.xml
ADD ./src src/
RUN chmod -R 755 /opt/apache-maven-3.6.3/bin/*
RUN /opt/apache-maven-3.6.3/bin/mvn  clean -U package -Dmaven.test.skip=true -U
RUN pwd
ENV LC_ALL=zh_CN.utf8
ENV LANG=zh_CN.utf8
ENV LANGUAGE=zh_CN.utf8
RUN localedef -c -f UTF-8 -i zh_CN zh_CN.utf8
VOLUME /tmp
#设置时区
RUN ln -snf /usr/share/zoneinfo/$TIME_ZONE /etc/localtime && echo $TIME_ZONE > /etc/timezone
RUN mkdir -p /opt/apps/upscale-hotel
RUN mkdir -p /opt/logs/upscale-hotel
RUN chmod -R 755 /opt/logs/upscale-hotel
RUN source /etc/profile

WORKDIR /opt/apps/upscale-hotel

RUN cp -rf /opt/apps/target/upscale-hotel-graphql-api-exec.jar ./app.jar
CMD java -Djava.security.egd=file:/dev/./urandom $JVM_PARAMS $COMMON_PARAMS $APP_PARAMS -jar app.jar
